<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns="http://www.w3.org/1999/xhtml"
                template="./tpl/template.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">

    <ui:define name="title">
        Вход
    </ui:define>   

    <ui:define name="left">
        <ul class="nav nav-sidebar">
            <li><a href="./index.xhtml">Главная</a></li>                      
            <li><a href="./registration.xhtml">Регистрация</a></li>
            <li><a href="./help.xhtml">Помощь</a></li>
        </ul>
    </ui:define>

    <ui:define name="content">
        <style>
            .form-signin {
                max-width: 330px;
                padding: 15px;
                margin: 0 auto;
              }
              .form-signin .form-signin-heading,
              .form-signin .checkbox {
                margin-bottom: 10px;
              }
              .form-signin .checkbox {
                font-weight: normal;
              }
              .form-signin .form-control {
                position: relative;
                height: auto;
                -webkit-box-sizing: border-box;
                   -moz-box-sizing: border-box;
                        box-sizing: border-box;
                padding: 10px;
                font-size: 16px;
              }
              .form-signin .form-control:focus {
                z-index: 2;
              }
              .form-signin input[type="text"] {
                margin-bottom: -1px;
                border-bottom-right-radius: 0;
                border-bottom-left-radius: 0;
              }
              .form-signin input[type="password"] {
                margin-bottom: 10px;
                border-top-left-radius: 0;
                border-top-right-radius: 0;
              }
        </style>
        <h:form class="form-signin">
            <h2 class="form-signin-heading">Страница входа</h2>
            <h:inputText class="form-control" pt:placeholder="Email" value="#{loginView.email}" required="true"></h:inputText>
            <h:inputSecret class="form-control" pt:placeholder="Password" value="#{loginView.password}"  required = "true"></h:inputSecret>
            
            <h:commandButton  action="#{loginView.postLogin()}" class="btn btn-lg btn-primary btn-block" value="Войти"></h:commandButton>
        </h:form>
    </ui:define>

</ui:composition>
